#pragma once

#include "Types.h"
#include "RefCount.h"
#include "SceneObject.h"
#include <map>

enum E_PROJECTILE_TYPE{
	Laserhead,
	Nuclear,
	Counter,
	None
};

class CProjectile : public CSceneObject, public TRefCount<CProjectile>
{
public:
	CProjectile(void);
	~CProjectile(void);
	virtual __inline E_GAMEOBJECT_TYPE getType(){ return E_GAMEOBJECT_TYPE::Projectile; } 
	virtual __inline E_PROJECTILE_TYPE getProjectileType(){ return E_PROJECTILE_TYPE::None; } 
	virtual bool collisionCallback(CSceneObject *obj);
	virtual void passTime(f32);

	static OBJSTRMAP  deserializeProjectileTypeList(char *name);
	static OBJSTRMAP  deserializeProjectileTypeList(char *buffer, long length);
	static OBJSTRMAP  deserializeProjectileTypeList(irr::io::IFileReadCallBack *file);
	
	virtual CProjectile *copy(void);
	virtual void copy(CProjectile *);
	DECLARE_MEMBER(char *, Name)
	DECLARE_MEMBER(char *, Class)
	DECLARE_MEMBER(f32, Mass)
	DECLARE_MEMBER(f32, MaxNormalAcceleration)
	DECLARE_MEMBER(f32, MaxHyperAcceleration)
	DECLARE_MEMBER(vector3df, Dimensions)
	DECLARE_MEMBER(SArmor, SidewallArmor)
	DECLARE_MEMBER(SArmor, HullArmor)

	DECLARE_MEMBER(SArmor, HullArmorDamage)
	DECLARE_MEMBER(SArmor, SidewallArmorDamage)

	DECLARE_MEMBER(f32, BaseDamage)
	DECLARE_MEMBER(f32, StandoffRange)
};
